9.21
This commit is contained in:
parent
672a04e102
commit
6535769db2
@ -42,6 +42,9 @@
|
||||
<if test="integralDetail.userId != null">
|
||||
and id.user_id = #{integralDetail.userId}
|
||||
</if>
|
||||
<if test="integralDetail.type != null and integralDetail.type != ''">
|
||||
and id.type = #{integralDetail.type}
|
||||
</if>
|
||||
<if test="integralDetail.startTime != null and integralDetail.startTime != '' and integralDetail.endTime != null and integralDetail.endTime != ''">
|
||||
and id.create_time between #{integralDetail.startTime} and #{integralDetail.endTime}
|
||||
</if>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<view class="top-box" @click="goIntegral">
|
||||
|
||||
<view class="">积分余额</view>
|
||||
<view class="d-s">4800 <u-icon name="arrow-right"></u-icon> </view>
|
||||
<view class="d-s">{{cardBalance.points || 0}}<u-icon name="arrow-right"></u-icon> </view>
|
||||
</view>
|
||||
<view class="f-box" v-for="(item,index) in 3" :key="index" @click="goDetails()">
|
||||
<view class="f-top">中建锦绣二期站可用</view>
|
||||
@ -31,13 +31,37 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from '../../utils/request'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
query: {
|
||||
chainStoreId: '',
|
||||
couponType: '',
|
||||
useStatus: 0,
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
cardBalance: {},
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.query.chainStoreId = uni.getStorageSync('chainStoreId');
|
||||
this.getUserBalance()
|
||||
},
|
||||
methods: {
|
||||
// 获取余额信息
|
||||
getUserBalance() {
|
||||
request({
|
||||
url: '/business/userManager/user/getUserBalanceApplet',
|
||||
method: 'get',
|
||||
params: this.query
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.cardBalance = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
goIntegral() {
|
||||
uni.navigateTo({
|
||||
url: '/pagesMy/integral/integral'
|
||||
@ -145,4 +169,4 @@
|
||||
font-size: 10px;
|
||||
color: #666666;
|
||||
}
|
||||
</style>
|
||||
</style>
|
@ -55,7 +55,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<u-datetime-picker :show="show" v-model="value1" mode="date" @cancel="cancel1"
|
||||
<u-datetime-picker :show="show" v-model="value1" mode="year-month" @cancel="cancel1"
|
||||
@confirm="confirm1"></u-datetime-picker>
|
||||
<u-picker :show="show1" :columns="columns" @cancel="cancel" @confirm="confirm"></u-picker>
|
||||
</view>
|
||||
@ -82,7 +82,7 @@
|
||||
['全部类型', '消费有礼', '会员充值']
|
||||
],
|
||||
queryParams: {
|
||||
page: 1,
|
||||
pageNo: 1,
|
||||
pageSize: 30,
|
||||
storeId: uni.getStorageSync('storeId'),
|
||||
changeType: '',
|
||||
@ -101,7 +101,7 @@
|
||||
console.log("刷新");
|
||||
this.orderList = []
|
||||
this.queryParams = {
|
||||
page: 1,
|
||||
pageNo: 1,
|
||||
pageSize: 30,
|
||||
storeId: uni.getStorageSync('storeId'),
|
||||
changeType: '',
|
||||
@ -112,7 +112,7 @@
|
||||
onReachBottom() {
|
||||
// 触底加载
|
||||
if (this.orderList.length < this.total) {
|
||||
this.queryParams.page++
|
||||
this.queryParams.pageNo++
|
||||
this.getOrderList()
|
||||
}
|
||||
},
|
||||
@ -125,8 +125,9 @@
|
||||
params: this.queryParams
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.orderList = res.data.content
|
||||
this.total = res.data.totalElements
|
||||
this.orderList = res.data.records
|
||||
this.total = res.data.total
|
||||
console.log(res,130);
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -143,7 +144,7 @@
|
||||
})
|
||||
},
|
||||
confirm(e) {
|
||||
this.queryParams.page = 1
|
||||
this.queryParams.pageNo = 1
|
||||
if (e.indexs[0] == 1) {
|
||||
this.queryParams.changeType = 0
|
||||
} else if (e.indexs[0] == 2) {
|
||||
@ -164,11 +165,11 @@
|
||||
const dateString = date.toLocaleDateString()
|
||||
const timeString = date.toLocaleTimeString();
|
||||
// 返回日期和时间的组合
|
||||
return dateString;
|
||||
return date.getFullYear() + '-' + (date.getMonth()+1);
|
||||
},
|
||||
confirm1(e) {
|
||||
this.queryParams.startTime = this.timestampToString(e.value)
|
||||
this.queryParams.page = 1
|
||||
this.queryParams.pageNo = 1
|
||||
this.getOrderList()
|
||||
this.show = false
|
||||
},
|
||||
|
@ -4,32 +4,39 @@
|
||||
<view class="card_box">
|
||||
|
||||
<view style="margin: 13px 0px;">当前积分</view>
|
||||
<view class="r-num">123456.98</view>
|
||||
<view class="r-num">{{cardBalance.points || 0}}</view>
|
||||
</view>
|
||||
<view class="tab-bs">
|
||||
<view class="w_box" @click="show1 = true">类型筛选 <u-icon name="arrow-down-fill"></u-icon> </view>
|
||||
<view class="w_box" @click="show = true">全部时间 <u-icon name="arrow-down-fill"></u-icon> </view>
|
||||
</view>
|
||||
<view class="bai_box">
|
||||
<view class="bai_box" v-for="(item,index) in pointsList" :key="index">
|
||||
<view class="left-img">
|
||||
<image src="../../static/icon/hyxf.png" mode=""></image>
|
||||
<!-- <image src="../../static/icon/hyxf.png" mode=""></image> -->
|
||||
<image src="../../static/icon/jfdh.png" mode=""></image>
|
||||
</view>
|
||||
<view style="width: 85%;">
|
||||
<view class="right-box">
|
||||
<view class="l-text">会员消费</view>
|
||||
<view class="r-text">-199.00</view>
|
||||
<view class="l-text">{{item.changeReason}}</view>
|
||||
<view class="r-text" v-if="item.changeType==1">{{item.pointsChange}}</view>
|
||||
<view class="r-text" v-else-if="item.changeType==0">-{{item.pointsChange}}</view>
|
||||
<view class="r-text" v-else>0</view>
|
||||
</view>
|
||||
<view class="right-box">
|
||||
<view class="">储值卡</view>
|
||||
<view class="">余额123456.98</view>
|
||||
<view class="">会员积分</view>
|
||||
<view class="">余额{{item.currentPoints || 0}}</view>
|
||||
</view>
|
||||
<view class="right-box">
|
||||
<view class="">中建锦绣二期站</view>
|
||||
<view class="">2024-09-09 16:45:09</view>
|
||||
<view class="">{{item.storeName}}</view>
|
||||
<view class="">{{item.createTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bai_box">
|
||||
<view v-if="!pointsList || pointsList.length==0">
|
||||
<u-empty mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png">
|
||||
</u-empty>
|
||||
</view>
|
||||
<!-- <view class="bai_box">
|
||||
<view class="left-img">
|
||||
<image src="../../static/icon/hycz.png" mode=""></image>
|
||||
</view>
|
||||
@ -66,29 +73,123 @@
|
||||
<view class="">2024-09-09 16:45:09</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-datetime-picker :show="show" v-model="value1" mode="datetime" @cancel="cancel1"></u-datetime-picker>
|
||||
<u-picker :show="show1" :columns="columns" @cancel="cancel"></u-picker>
|
||||
</view> -->
|
||||
<u-datetime-picker :show="show" v-model="value1" mode="year-month" @cancel="cancel1" @confirm="confirm1"></u-datetime-picker>
|
||||
<u-picker :show="show1" :columns="columns" @cancel="cancel" @confirm="confirm"></u-picker>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from '../../utils/request'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
query: {
|
||||
chainStoreId: '',
|
||||
couponType: '',
|
||||
useStatus: 0,
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
cardBalance: {},
|
||||
show: false,
|
||||
show1: false,
|
||||
value1: Number(new Date()),
|
||||
columns: [
|
||||
['中国', '美国', '日本']
|
||||
['全部类型', '消费有礼', '充值有礼', '积分兑换', '开卡有礼', '邀请有礼', '生日有礼', '推荐会员充值有礼',
|
||||
'推荐会员推荐有礼', '每日签到', '大转盘抽奖','九宫格抽奖']
|
||||
],
|
||||
queryParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 30,
|
||||
type: "",
|
||||
storeId: uni.getStorageSync("storeId"),
|
||||
changeReason: "",
|
||||
startTime: ""
|
||||
},
|
||||
pointsList: [],
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.query.chainStoreId = uni.getStorageSync('chainStoreId');
|
||||
this.getUserBalance()
|
||||
this.getList()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
console.log("刷新");
|
||||
this.pointsList = []
|
||||
this.queryParams = {
|
||||
pageNo: 1,
|
||||
pageSize: 30,
|
||||
type: "",
|
||||
storeId: uni.getStorageSync("storeId"),
|
||||
changeReason: "",
|
||||
startTime: ""
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
onReachBottom() {
|
||||
// 触底加载
|
||||
if (this.pointsList.length < this.total) {
|
||||
this.queryParams.pageNo++
|
||||
this.getList()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取余额信息
|
||||
getUserBalance() {
|
||||
request({
|
||||
url: '/business/userManager/user/getUserBalanceApplet',
|
||||
method: 'get',
|
||||
params: this.query
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.cardBalance = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
request({
|
||||
url: '/business/integral/integralDetail/queryByPageUni',
|
||||
method: 'get',
|
||||
params: this.queryParams
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.pointsList = res.data.records
|
||||
this.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
confirm(e) {
|
||||
this.queryParams.pageNo = 1
|
||||
if (e.value[0] == '全部类型') {
|
||||
this.queryParams.type = ""
|
||||
} else {
|
||||
this.queryParams.type = e.value[0]
|
||||
}
|
||||
this.getList()
|
||||
this.show1 = false
|
||||
},
|
||||
cancel() {
|
||||
this.show1 = false
|
||||
},
|
||||
timestampToString(timestamp) {
|
||||
// 将时间戳转换为Date对象
|
||||
const date = new Date(timestamp);
|
||||
// 使用toLocaleDateString和toLocaleTimeString可以根据本地格式转换日期和时间
|
||||
const dateString = date.toLocaleDateString()
|
||||
const timeString = date.toLocaleTimeString();
|
||||
// 返回日期和时间的组合
|
||||
return date.getFullYear() + '-' + (date.getMonth() + 1);
|
||||
},
|
||||
confirm1(e) {
|
||||
this.queryParams.startTime = this.timestampToString(e.value)
|
||||
this.queryParams.pageNo = 1
|
||||
this.getList()
|
||||
this.show = false
|
||||
},
|
||||
cancel1() {
|
||||
this.show = false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user